package com.example.demo.Dao;

import com.example.demo.enity.RecruitmentInfo;
import com.example.demo.enity.RecruitmentInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface RecruitmentInfoMapper {
    long countByExample(RecruitmentInfoExample example);

    int deleteByExample(RecruitmentInfoExample example);

    int deleteByPrimaryKey(Integer zpid);

    int insert(RecruitmentInfo record);

    int insertSelective(RecruitmentInfo record);

    List<RecruitmentInfo> selectByExample(RecruitmentInfoExample example);

    //根据招聘id查询招聘信息，用于用户点击单个招聘项时显示完整信息
    RecruitmentInfo selectByPrimaryKey(Integer zpid);
    
    //自定义模糊查询查询，通过招聘信息名，并且封装工作性质
    List<RecruitmentInfo>  selectRecruitmentInfoByLikeZpname(String zpname);
    //自定义查询，通过用户id，并且封装工作性质
    List<RecruitmentInfo>  selectRecruitmentInfoByUid(Integer uid);
  
    //自定义查询，通过职位性质，并且封装工作性质
    List<RecruitmentInfo>  selectRecruitmentInfoByZwId(Integer zwid);
    
    int updateByExampleSelective(@Param("record") RecruitmentInfo record, @Param("example") RecruitmentInfoExample example);

    int updateByExample(@Param("record") RecruitmentInfo record, @Param("example") RecruitmentInfoExample example);

    int updateByPrimaryKeySelective(RecruitmentInfo record);

    int updateByPrimaryKey(RecruitmentInfo record);
    
    //通过简历id，举报用户
    int reportRecruitmentWithUserByZpid(Integer zpid);
    
    //查找所有违规次数超过5次的简历
    List<RecruitmentInfo> selectAllIlleageRecuitment(RecruitmentInfoExample example);
}